Skip to content

Conversation

@printminion-co
Copy link

@printminion-co printminion-co commented Oct 29, 2025

IONOS_MAILCONFIG_API_URL=http://mailconfig.api.localhost:4010
IONOS_MAILCONFIG_API_USER=foo
IONOS_MAILCONFIG_API_PASS=bar

@printminion-co printminion-co mentioned this pull request Oct 29, 2025
3 tasks
@printminion-co printminion-co force-pushed the mk/dev/add_proper_domain branch 6 times, most recently from 9a338a6 to 85d6d43 Compare October 29, 2025 15:59
@printminion-co printminion-co force-pushed the mk/dev/add_proper_domain branch from 85d6d43 to 2ee9cd1 Compare October 29, 2025 16:37
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the IONOS email account creation flow to separate username from domain. Instead of accepting a full email address, the system now accepts only the username portion and constructs the full email address by appending a configured mail domain extracted from the customer domain setting.

Key changes:

  • Extract mail domain from customer domain using Public Suffix List
  • Change API parameters from emailAddress to emailUser/userName
  • Remove email validation and extraction logic from IonosMailService
  • Update frontend to display domain suffix and collect only username

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
lib/Service/IONOS/IonosConfigService.php Added getMailDomain() method to extract registrable domain from customer domain using Pdp library
lib/Service/IONOS/IonosMailService.php Refactored createEmailAccount() to accept username instead of email address; removed extractDomain() and extractUsername() helper methods
lib/Controller/IonosAccountsController.php Updated parameter from emailAddress to emailUser; removed email format validation; updated logging to use the constructed email from response
lib/Controller/PageController.php Added IonosConfigService dependency and included mail domain in initial state
src/components/ionos/NewEmailAddressTab.vue Changed input field from email to username; dynamically display domain suffix from preferences; construct full email for validation
src/init.js Added initialization of ionos-mailconfig-domain preference in store
tests/Unit/Service/IONOS/IonosConfigServiceTest.php Added comprehensive tests for getMailDomain() covering various domain formats
tests/Unit/Service/IONOS/IonosMailServiceTest.php Updated all tests to use username instead of email address; removed tests for extraction methods
tests/Unit/Controller/IonosAccountsControllerTest.php Updated tests to use emailUser parameter; removed email format validation test
tests/Unit/Controller/PageControllerTest.php Added IonosConfigService mock and verified mail domain is included in preferences
Comments suppressed due to low confidence (1)

src/components/ionos/NewEmailAddressTab.vue:1

  • [nitpick] Comment updated to 'email user' but should be consistent with terminology used elsewhere. Consider 'Test with empty username' to match the parameter name.
<!--

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

$user = $this->userSession->getUser();
$response = new TemplateResponse($this->appName, 'index');


Copy link

Copilot AI Oct 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary blank lines added. Remove extra blank line to maintain consistent code formatting.

Suggested change

Copilot uses AI. Check for mistakes.
@printminion-co printminion-co force-pushed the mk/dev/add_proper_domain branch from 2ee9cd1 to 6d16117 Compare October 30, 2025 09:40
@printminion-co printminion-co merged commit 0b261cf into feature/create-ionos-mail Oct 30, 2025
22 of 27 checks passed
@printminion-co printminion-co deleted the mk/dev/add_proper_domain branch October 30, 2025 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants